package com.yungui.netflix.hystrix.client;

import com.yungui.netflix.hystrix.fallback.UserClientHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "consul-provider", fallback = UserClientHystrix.class)
public interface UserClient {

    @GetMapping("/test/demo1")
    String sayHello(@RequestParam(value = "name") String name);

    @GetMapping("/timeOut")
    String timeOut() throws InterruptedException;

    @GetMapping("/exception")
    String exception() throws Exception;
}